package com.ehome.poct.core.api.dto.message;

import cn.hutool.crypto.digest.DigestUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 合伙人端发过来的消息原始数据
 * @author cq
 */
@Data
@Accessors(chain = true)
public class QueueMessageOriginDTO<T extends MqMsgSendBaseDTO> extends QueueMessageDTO {
    @ApiModelProperty("数据包")
    private T data;
    @ApiModelProperty("消息体签名")
    private String md5Sign;

    public void setMd5Sign(){
        this.md5Sign= DigestUtil.md5Hex(this.data.toMd5String());
    }
}
